﻿@{
    ViewBag.Title = "出库单";
    var st = ViewBag.ST as CubicFWNet.Data.ViewModal.StorageTableView;
}
<section class="content-header">
    <h1>
        出库单
    </h1>
    <ol class="breadcrumb">
        <li><a href="javascript:void(0);"><i class="fa fa-dashboard"></i>@Resources.Global.PageTitle</a></li>
        <li><a href="@Url.Action("Index","Home")">首页</a></li>
        <li class="active"><a href="@Url.Action("AddOutStorage", "StorageTable")">出库单</a></li>
    </ol>
</section>
<section class="content">
    <form class="form-horizontal" method="post" id="formMain">
        <div class="box box-solid">
            <div class="box-body">
                <div class="row">
                    <input type="hidden" id="SID" name="SID" value="@st.Id" />
                    @*<input type="hidden" id="InvoiceID" name="InvoiceID" value="@st.InvoiceID"/>*@
                    <div class="form-group col-md-6 col-sm-12">
                        <label for="ProductName" class="col-sm-3 control-label">产品名称</label>
                        @*<div class="col-sm-9">
                            <input type="text" class="form-control" id="ProductName" name="ProductName" value="@st.ProductName （外部名称：@st.CusProName）" readonly />
                        </div>*@
                    </div>
                    @*<div class="form-group col-md-6 col-sm-12">
                        <label for="OrderNumber" class="col-sm-3 control-label">订单号</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="OrderNumber" name="OrderNumber" value="@st.OrderNumber" readonly>
                        </div>
                    </div>
                    <div class="form-group col-md-6 col-sm-12">
                            <label for="InvoiceNumber" class="col-sm-3 control-label">发货单号</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="InvoiceNumber" name="InvoiceNumber" value="@st.InvoiceNumber" readonly>
                            </div>
                        </div>

                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Format" class="col-sm-3 control-label">规格</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="Format" name="Format" value="@st.Format" readonly>
                        </div>
                    </div>*@


                    @*<div class="form-group col-md-6 col-sm-12">
                        <label for="Unit" class="col-sm-3 control-label">单位</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="Unit" name="Unit" value="@st.Unit" readonly>
                        </div>
                    </div>

                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Amount" class="col-sm-3 control-label">出库数量</label>
                        <div class="col-sm-9">
                            <input type="number" class="form-control" id="Amount" name="Amount" value="@st.Amount" maxlength="20" readonly>
                        </div>
                    </div>*@

                </div>

                <div class="row">
                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Memo" class="col-sm-3 control-label">备注</label>
                        <div class="col-sm-9">
                            <textarea rows="3" class="form-control" id="Memo" name="Memo" maxlength="500"></textarea>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Creator" class="col-sm-3 control-label">创建人</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="Creator" name="Tolerance" value="@ViewBag.RealName" readonly="readonly" />
                        </div>
                    </div>
                    <div class="form-group col-md-6 col-sm-12">
                        <label for="CreateTime" class="col-sm-3 control-label">创建时间</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="CreateTime" value="@DateTime.Now.ToString("yyyy-MM-dd HH:mm")" readonly="readonly" />
                        </div>
                    </div>
                </div>

            </div>
            <div class="box-footer">
                <div class="box-footer">
                    <span class="btn btn-primary " onclick="FormSub()">确 定</span>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a class="btn btn-primary" href="@Url.Action("OutStorage","StorageTable")">返 回</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="text-red">@ViewBag.Info</span>
                </div>
            </div>
        </div>
    </form>
</section>

@section Scripts {
    <script>


    //提交表单
    function FormSub() {

        var amount = $("#Amount").val().trim();
        if (amount == "" || amount<=0) {
            $.modalAlert("请输入正确的产品数量", "warning");
            return false;
        }

        $("#formMain").submit();
    }
    </script>
}